﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Camc.Quality.Migrations
{
    public partial class add_materialsContent2 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
 

            migrationBuilder.DropColumn(
                name: "MaterialsNodeId",
                table: "MaterialsDescs");

            migrationBuilder.AlterColumn<Guid>(
                name: "ParentCode",
                table: "MaterialsNodes",
                nullable: false,
                oldClrType: typeof(string),
                oldNullable: true);

            migrationBuilder.AlterColumn<Guid>(
                name: "MaterialsDescId",
                table: "MaterialsNodes",
                nullable: false,
                oldClrType: typeof(Guid),
                oldNullable: true);

          
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            

            migrationBuilder.AlterColumn<string>(
                name: "ParentCode",
                table: "MaterialsNodes",
                nullable: true,
                oldClrType: typeof(Guid));

            migrationBuilder.AlterColumn<Guid>(
                name: "MaterialsDescId",
                table: "MaterialsNodes",
                nullable: true,
                oldClrType: typeof(Guid));

            migrationBuilder.AddColumn<Guid>(
                name: "MaterialsNodeId",
                table: "MaterialsDescs",
                nullable: false,
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));

         
        }
    }
}
